↳ Prolog
↳ PrologToPiTRSProof
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → EQ_IN_AG(N1, s(X))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_GGGGA(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_GGGGA(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → APPEND_IN_GGA(M1, .(mv(A, C), []), T)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → U6_GGA(H, L, L1, R, append_in_gga(L, L1, R))
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_GGGGA(X, A, B, C, M, append_in_gga(T, M2, M))
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → APPEND_IN_GGA(T, M2, M)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → EQ_IN_AG(N1, s(X))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_GGGGA(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_GGGGA(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
U3_GGGGA(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → APPEND_IN_GGA(M1, .(mv(A, C), []), T)
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → U6_GGA(H, L, L1, R, append_in_gga(L, L1, R))
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_GGGGA(X, A, B, C, M, append_in_gga(T, M2, M))
U4_GGGGA(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → APPEND_IN_GGA(T, M2, M)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
APPEND_IN_GGA(.(H, L), L1, .(H, R)) → APPEND_IN_GGA(L, L1, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
APPEND_IN_GGA(.(H, L), L1) → APPEND_IN_GGA(L, L1)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
U2_GGGGA(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → SHANOI_IN_GGGGA(N1, B, A, C, M2)
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_GGGGA(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U1_GGGGA(X, A, B, C, M, eq_out_ag(N1, s(X))) → SHANOI_IN_GGGGA(N1, A, C, B, M1)
SHANOI_IN_GGGGA(s(s(X)), A, B, C, M) → U1_GGGGA(X, A, B, C, M, eq_in_ag(N1, s(X)))
shanoi_in_gggga(s(0), A, B, C, .(mv(A, C), [])) → shanoi_out_gggga(s(0), A, B, C, .(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C, M) → U1_gggga(X, A, B, C, M, eq_in_ag(N1, s(X)))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_gggga(X, A, B, C, M, eq_out_ag(N1, s(X))) → U2_gggga(X, A, B, C, M, N1, shanoi_in_gggga(N1, A, C, B, M1))
U2_gggga(X, A, B, C, M, N1, shanoi_out_gggga(N1, A, C, B, M1)) → U3_gggga(X, A, B, C, M, M1, shanoi_in_gggga(N1, B, A, C, M2))
U3_gggga(X, A, B, C, M, M1, shanoi_out_gggga(N1, B, A, C, M2)) → U4_gggga(X, A, B, C, M, M2, append_in_gga(M1, .(mv(A, C), []), T))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L), L1, .(H, R)) → U6_gga(H, L, L1, R, append_in_gga(L, L1, R))
U6_gga(H, L, L1, R, append_out_gga(L, L1, R)) → append_out_gga(.(H, L), L1, .(H, R))
U4_gggga(X, A, B, C, M, M2, append_out_gga(M1, .(mv(A, C), []), T)) → U5_gggga(X, A, B, C, M, append_in_gga(T, M2, M))
U5_gggga(X, A, B, C, M, append_out_gga(T, M2, M)) → shanoi_out_gggga(s(s(X)), A, B, C, M)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
U1_GGGGA(A, B, C, eq_out_ag(N1)) → SHANOI_IN_GGGGA(N1, A, C, B)
U2_GGGGA(A, B, C, N1, shanoi_out_gggga(M1)) → SHANOI_IN_GGGGA(N1, B, A, C)
U1_GGGGA(A, B, C, eq_out_ag(N1)) → U2_GGGGA(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
SHANOI_IN_GGGGA(s(s(X)), A, B, C) → U1_GGGGA(A, B, C, eq_in_ag(s(X)))
shanoi_in_gggga(s(0), A, B, C) → shanoi_out_gggga(.(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C) → U1_gggga(A, B, C, eq_in_ag(s(X)))
eq_in_ag(X) → eq_out_ag(X)
U1_gggga(A, B, C, eq_out_ag(N1)) → U2_gggga(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_gggga(A, B, C, N1, shanoi_out_gggga(M1)) → U3_gggga(A, C, M1, shanoi_in_gggga(N1, B, A, C))
U3_gggga(A, C, M1, shanoi_out_gggga(M2)) → U4_gggga(M2, append_in_gga(M1, .(mv(A, C), [])))
append_in_gga([], L) → append_out_gga(L)
append_in_gga(.(H, L), L1) → U6_gga(H, append_in_gga(L, L1))
U6_gga(H, append_out_gga(R)) → append_out_gga(.(H, R))
U4_gggga(M2, append_out_gga(T)) → U5_gggga(append_in_gga(T, M2))
U5_gggga(append_out_gga(M)) → shanoi_out_gggga(M)
shanoi_in_gggga(x0, x1, x2, x3)
eq_in_ag(x0)
U1_gggga(x0, x1, x2, x3)
U2_gggga(x0, x1, x2, x3, x4)
U3_gggga(x0, x1, x2, x3)
append_in_gga(x0, x1)
U6_gga(x0, x1)
U4_gggga(x0, x1)
U5_gggga(x0)
SHANOI_IN_GGGGA(s(s(X)), A, B, C) → U1_GGGGA(A, B, C, eq_out_ag(s(X)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ QDPOrderProof
U1_GGGGA(A, B, C, eq_out_ag(N1)) → SHANOI_IN_GGGGA(N1, A, C, B)
SHANOI_IN_GGGGA(s(s(X)), A, B, C) → U1_GGGGA(A, B, C, eq_out_ag(s(X)))
U2_GGGGA(A, B, C, N1, shanoi_out_gggga(M1)) → SHANOI_IN_GGGGA(N1, B, A, C)
U1_GGGGA(A, B, C, eq_out_ag(N1)) → U2_GGGGA(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
shanoi_in_gggga(s(0), A, B, C) → shanoi_out_gggga(.(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C) → U1_gggga(A, B, C, eq_in_ag(s(X)))
eq_in_ag(X) → eq_out_ag(X)
U1_gggga(A, B, C, eq_out_ag(N1)) → U2_gggga(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_gggga(A, B, C, N1, shanoi_out_gggga(M1)) → U3_gggga(A, C, M1, shanoi_in_gggga(N1, B, A, C))
U3_gggga(A, C, M1, shanoi_out_gggga(M2)) → U4_gggga(M2, append_in_gga(M1, .(mv(A, C), [])))
append_in_gga([], L) → append_out_gga(L)
append_in_gga(.(H, L), L1) → U6_gga(H, append_in_gga(L, L1))
U6_gga(H, append_out_gga(R)) → append_out_gga(.(H, R))
U4_gggga(M2, append_out_gga(T)) → U5_gggga(append_in_gga(T, M2))
U5_gggga(append_out_gga(M)) → shanoi_out_gggga(M)
shanoi_in_gggga(x0, x1, x2, x3)
eq_in_ag(x0)
U1_gggga(x0, x1, x2, x3)
U2_gggga(x0, x1, x2, x3, x4)
U3_gggga(x0, x1, x2, x3)
append_in_gga(x0, x1)
U6_gga(x0, x1)
U4_gggga(x0, x1)
U5_gggga(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
SHANOI_IN_GGGGA(s(s(X)), A, B, C) → U1_GGGGA(A, B, C, eq_out_ag(s(X)))
Used ordering: Polynomial interpretation [25]:
U1_GGGGA(A, B, C, eq_out_ag(N1)) → SHANOI_IN_GGGGA(N1, A, C, B)
U2_GGGGA(A, B, C, N1, shanoi_out_gggga(M1)) → SHANOI_IN_GGGGA(N1, B, A, C)
U1_GGGGA(A, B, C, eq_out_ag(N1)) → U2_GGGGA(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
POL(.(x1, x2)) = 1 + x1 + x2
POL(0) = 0
POL(SHANOI_IN_GGGGA(x1, x2, x3, x4)) = x1
POL(U1_GGGGA(x1, x2, x3, x4)) = x4
POL(U1_gggga(x1, x2, x3, x4)) = 0
POL(U2_GGGGA(x1, x2, x3, x4, x5)) = x4
POL(U2_gggga(x1, x2, x3, x4, x5)) = 0
POL(U3_gggga(x1, x2, x3, x4)) = 0
POL(U4_gggga(x1, x2)) = 0
POL(U5_gggga(x1)) = 0
POL(U6_gga(x1, x2)) = 1
POL([]) = 1
POL(append_in_gga(x1, x2)) = 1 + x1 + x2
POL(append_out_gga(x1)) = 1
POL(eq_in_ag(x1)) = 0
POL(eq_out_ag(x1)) = x1
POL(mv(x1, x2)) = 0
POL(s(x1)) = 1 + x1
POL(shanoi_in_gggga(x1, x2, x3, x4)) = 0
POL(shanoi_out_gggga(x1)) = 0
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Rewriting
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
U1_GGGGA(A, B, C, eq_out_ag(N1)) → SHANOI_IN_GGGGA(N1, A, C, B)
U2_GGGGA(A, B, C, N1, shanoi_out_gggga(M1)) → SHANOI_IN_GGGGA(N1, B, A, C)
U1_GGGGA(A, B, C, eq_out_ag(N1)) → U2_GGGGA(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
shanoi_in_gggga(s(0), A, B, C) → shanoi_out_gggga(.(mv(A, C), []))
shanoi_in_gggga(s(s(X)), A, B, C) → U1_gggga(A, B, C, eq_in_ag(s(X)))
eq_in_ag(X) → eq_out_ag(X)
U1_gggga(A, B, C, eq_out_ag(N1)) → U2_gggga(A, B, C, N1, shanoi_in_gggga(N1, A, C, B))
U2_gggga(A, B, C, N1, shanoi_out_gggga(M1)) → U3_gggga(A, C, M1, shanoi_in_gggga(N1, B, A, C))
U3_gggga(A, C, M1, shanoi_out_gggga(M2)) → U4_gggga(M2, append_in_gga(M1, .(mv(A, C), [])))
append_in_gga([], L) → append_out_gga(L)
append_in_gga(.(H, L), L1) → U6_gga(H, append_in_gga(L, L1))
U6_gga(H, append_out_gga(R)) → append_out_gga(.(H, R))
U4_gggga(M2, append_out_gga(T)) → U5_gggga(append_in_gga(T, M2))
U5_gggga(append_out_gga(M)) → shanoi_out_gggga(M)
shanoi_in_gggga(x0, x1, x2, x3)
eq_in_ag(x0)
U1_gggga(x0, x1, x2, x3)
U2_gggga(x0, x1, x2, x3, x4)
U3_gggga(x0, x1, x2, x3)
append_in_gga(x0, x1)
U6_gga(x0, x1)
U4_gggga(x0, x1)
U5_gggga(x0)